package service.impl;

import dao.NewsDao;
import dao.impl.NewsDaoImpl;
import factory.SimpleDaoFactory;
import pojo.News;
import service.NewsService;

public class NewsServiceImpl implements NewsService {
//    NewsDao newsDao = new NewsDaoImpl();
//    @Override
//    public void save(News news) {
//        newsDao.save(news);
//    }
    private NewsDao dao;

    public void setDao(NewsDao dao) {
        this.dao = dao;
    }

    public void addNews(News news){
        dao.save(news);
    }
}
